home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Workbench Add-On
/
Workbench Add-On - Volume 1.iso
/
Dev
/
Oberon
/
source
/
AmigaUtil
/
ASLUtil.mod
< prev
next >
Wrap
Text File
|
1995-06-29
|
1KB
|
60 lines
(*************************************************************************
$RCSfile: ASLUtil.mod $
Description: Support for clients of asl.library
Created by: fjc (Frank Copeland)
$Revision: 3.8 $
$Author: fjc $
$Date: 1995/06/04 23:18:08 $
Copyright © 1994, Frank Copeland.
This file is part of the Oberon-A Library.
See Oberon-A.doc for conditions of use and distribution.
*************************************************************************)
<* STANDARD- *>
MODULE ASLUtil;
IMPORT SYS := SYSTEM, u := Utility, i := Intuition, ASL;
(*------------------------------------*)
(*
Simple wrapper for calling the ASL FileRequester.
*)
PROCEDURE RequestFile * (
window : i.WindowPtr;
hail : ARRAY OF CHAR;
VAR file : ARRAY OF CHAR;
VAR directory : ARRAY OF CHAR )
: BOOLEAN;
VAR
fr : ASL.FileRequesterPtr; result : BOOLEAN;
<*$CopyArrays-*>
BEGIN (* RequestFile *)
fr := SYS.VAL (ASL.FileRequesterPtr,
ASL.AllocAslRequestTags
( ASL.fileRequest,
ASL.hail, SYS.ADR (hail),
ASL.window, window,
ASL.file, SYS.ADR (file),
ASL.dir, SYS.ADR (directory),
u.end ));
IF fr # NIL THEN
result := ASL.AslRequestTags (fr, u.end);
IF result THEN COPY (fr.drawer^, directory); COPY (fr.file^, file) END;
ASL.FreeAslRequest (fr)
ELSE
result := FALSE
END;
RETURN result
END RequestFile;
END ASLUtil.